package com.anjiplus.template.gaea.business.modules.dict.dao.entity;

import com.anji.plus.gaea.annotation.UnionUnique;
import com.anji.plus.gaea.annotation.UnionUniqueCode;
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.anjiplus.template.gaea.business.constant.BusinessConstant;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 数据字典项(GaeaDictItem)实体类
 *
 * @author lirui
 * @since 2021-03-09 15:52:41
 */
@Data
@TableName(keepGlobalPrefix = true, value = "gaea_dict_item")
@UnionUniqueCode(group = BusinessConstant.DICT_ITEM_EXIST_GROUP, code = ResponseCode.DICT_ITEM_REPEAT)
public class GaeaDictItem extends GaeaBaseEntity implements Serializable {

    /**
     * 数据字典编码
     */
    @UnionUnique(group = BusinessConstant.DICT_ITEM_EXIST_GROUP)
    @TableField("\"dict_code\"")
    private String dictCode;
    /**
     * 字典项名称
     */
    @TableField("\"item_name\"")
    private String itemName;
    /**
     * 字典项值
     */
    @UnionUnique(group = BusinessConstant.DICT_ITEM_EXIST_GROUP)
    @TableField("\"item_value\"")
    private String itemValue;

    /**
     * 字典项扩展
     */
    @TableField("\"item_extend\"")
    private String itemExtend;
    /**
     * 语言标识
     */
    @UnionUnique(group = BusinessConstant.DICT_ITEM_EXIST_GROUP)
    @TableField("\"locale\"")
    private String locale;

    /**
     * 1：启用，0:禁用
     */
    @TableField("\"enabled\"")
    private Integer enabled;
    /**
     * 描述
     */
    @TableField("\"remark\"")
    private String remark;
    /**
     * 排序
     */
    @TableField("\"sort\"")
    private Integer sort;
}
